/*
 * FramesetElement.h
 *
 *  Created on: 2010-6-5
 *      Author: guobc
 */

#ifndef FRAMESETELEMENT_H_
#define FRAMESETELEMENT_H_

#include "CommonElement.h"
#include "FrameElement.h"

namespace HA {
class FramesetElement: public HA::CommonElement {
public:
	FramesetElement() :
		HA::CommonElement() {

	}

	/**
	 * Get the set of names handles by this element.
	 * @return The names to be matched that create elements of this type.
	 */
	inline string* getIds() const {
		return mIds;
	}

	/**
	 * Return the set of name that cause this element to finish.
	 * @return The names of following elements that stop further parse.
	 */
	inline string* getEnders() const {
		return mEnds;
	}

	/**
	 * Allow creating an instance of this node.
	 * @return A new instance of this node.
	 */
	inline ASTNode* newInstance() const {
		return new FramesetElement();
	}

	/**
	 * Retrun frames.
	 * @return The children of this element.
	 */
	ASTNodeList getFrames();

	/**
	 * Return the frame element with given frame name.
	 * @return The frame element of this frameset element.
	 */
	FrameElement* getFrame(string& name);

private:
	static string mIds[];
	static string mEnds[];
};
}

#endif /* FRAMESETELEMENT_H_ */
